package grafica;

import java.io.InputStream;
import javazoom.jl.decoder.JavaLayerException;
import javazoom.jl.player.Player;

public class Sonido extends Thread
{
	protected String filename;
	
	public Sonido(String fn)
	{filename=fn; }
	
	public void run()
	{InputStream fis=ClassLoader.getSystemClassLoader().getResourceAsStream("mp3/"+filename+".mp3");
	try{
		Player p=new Player(fis);
		p.play();
		}
	catch(JavaLayerException e) {e.getMessage(); }
	}

}
